<tr:document xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:tr="http://myfaces.apache.org/trinidad"
             xmlns:trh="http://myfaces.apache.org/trinidad/html" title="Home"
             onload="initializeAll();" onunload="GUnload();" styleClass="fp">
    <trh:head>
        <script type="text/javascript">
        var mapInitialized = false;
        var gmap; 
        var mgr;
        var icons = {};
        var allmarkers = [];
        </script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="stylesheet" type="text/css"
              href="${facesContext.externalContext.request.contextPath}/style/home.css"/>
        <link rel="stylesheet" type="text/css"
              href="${facesContext.externalContext.request.contextPath}/style/map.css"/>
        <script type="text/javascript"
                src="${facesContext.externalContext.request.contextPath}/sc/hu.js"></script>
        <script type="text/javascript"
                src="${facesContext.externalContext.request.contextPath}/sc/map.js"></script>
    </trh:head>
    <facet name="metaContainer">        
        <tr:form>
            <div class="tb">
                <span class="r">
                    <tr:selectOneChoice value="#{view.locale}" simple="true"
                                        autoSubmit="true"
                                        valueChangeListener="#{locales.valueChange}"
                                        styleClass="ho_soc"
                                        contentStyle="font-size: 11px;">
                        <f:selectItems value="#{locales.localeItems}"/>
                    </tr:selectOneChoice>
                </span>
            </div>
            <div class="mb">
                <tr:panelHorizontalLayout>
                    <f:facet name="separator">
                        <tr:outputText value="|"
                                       inlineStyle="padding-right: 2px; padding-left: 2px; color: #e3e6e8; font-family: Tahoma; font-size: 18px;"/>
                    </f:facet>
                    <tr:goLink text="#{messages['global.home']}"
                               styleClass="ho_ml" destination="/home"/>
                    <tr:goLink text="#{messages['global.profile']}"
                               styleClass="ho_ml" destination="/profile"/>
                    <tr:goLink text="#{messages['global.friends']}"
                               styleClass="ho_ml" destination="/friends"/>
                </tr:panelHorizontalLayout>
                 
                <span class="r">
                    <tr:panelHorizontalLayout>
                        <f:facet name="separator">
                            <tr:outputText value="|"
                                           inlineStyle="padding-right: 2px; padding-left: 2px; color: #e3e6e8; font-family: Tahoma; font-size: 18px;"/>
                        </f:facet>
                        <tr:goLink text="#{messages['global.inbox']}"
                                   styleClass="ho_ml" destination="/inbox"/>
                        <tr:goLink text="#{messages['global.settings']}"
                                   styleClass="ho_ml" destination="/settings"/>
                        <tr:goLink text="#{messages['global.help']}"
                                   styleClass="ho_ml" destination="/help"/>
                        <tr:goLink text="#{messages['global.logout']}"
                                   styleClass="ho_ml" destination="/logout"/>
                    </tr:panelHorizontalLayout>
                </span>
            </div>
            <div class="ct">
                <div class="l">
                    <div class="msgb">
                        <div class="msgb_b">
                            <div class="msgb_l">
                                <div class="msgb_r">
                                    <div class="msgb_bl">
                                        <div class="msgb_br">
                                            <div class="msgb_tl">
                                                <div class="msgb_tr">
                                                    <tr:panelGroupLayout layout="vertical">
                                                        <tr:outputText value="#{messages['global.whatareyoudoing']}"
                                                                       styleClass="fsp_ht"/>
                                                        <tr:spacer height="10px"/>
                                                        <tr:panelFormLayout>
                                                            <tr:panelLabelAndMessage for="MFDateSelect"
                                                                                     label="#{messages['global.date']}"
                                                                                     labelStyle="color: #02243c; font-size: 11px; font-family: Tahoma;">
                                                                <tr:panelHorizontalLayout inlineStyle="width: 463px;">
                                                                    <tr:panelHorizontalLayout>
                                                                        <tr:selectOneChoice simple="true"
                                                                                            id="MFDateSelect"
                                                                                            styleClass="ho_soc"
                                                                                            onchange="MFEvent_showHideDateDetails();"
                                                                                            value="#{HomeBean.selectedDate}">
                                                                            <f:selectItem itemLabel="#{messages['global.twodaysago']}"
                                                                                          itemValue="0"/>
                                                                            <f:selectItem itemLabel="#{messages['global.yesterday']}"
                                                                                          itemValue="1"/>
                                                                            <f:selectItem itemLabel="#{messages['global.now']}"
                                                                                          itemValue="2"/>
                                                                            <f:selectItem itemLabel="#{messages['global.today']}"
                                                                                          itemValue="3"/>
                                                                            <f:selectItem itemLabel="#{messages['global.tomorrow']}"
                                                                                          itemValue="4"/>
                                                                            <f:selectItem itemLabel="#{messages['global.twodayslater']}"
                                                                                          itemValue="5"/>
                                                                            <f:selectItem itemLabel="#{messages['global.selectdate']}"
                                                                                          itemValue="6"/>
                                                                        </tr:selectOneChoice>
                                                                        <tr:selectOneChoice id="MFEventDay"
                                                                                            styleClass="ho_soc"
                                                                                            inlineStyle="visibility: hidden;"
                                                                                            value="#{HomeBean.selectedDay}">
                                                                            <f:selectItems value="#{HomeBean.dayList}"/>
                                                                        </tr:selectOneChoice>
                                                                        <tr:selectOneChoice id="MFEventMonth"
                                                                                            styleClass="ho_soc"
                                                                                            inlineStyle="visibility: hidden;"
                                                                                            value="#{HomeBean.selectedMonth}">
                                                                            <f:selectItems value="#{HomeBean.monthList}"/>
                                                                        </tr:selectOneChoice>
                                                                        <tr:outputText id="MFEventAt"
                                                                                       value="#{messages['global.hour.at']}"
                                                                                       inlineStyle="font-family: Tahoma; font-size: 11px; visibility: hidden; padding-left: 6px; padding-right: 6px;"/>
                                                                        <tr:selectOneChoice id="MFEventHour"
                                                                                            simple="true"
                                                                                            styleClass="ho_soc"
                                                                                            inlineStyle="visibility: hidden;"
                                                                                            value="#{HomeBean.selectedHour}">
                                                                            <f:selectItems value="#{HomeBean.hourList}"/>
                                                                        </tr:selectOneChoice>
                                                                        <tr:outputText id="MFEventColon"
                                                                                       value=":"
                                                                                       inlineStyle="font-size: 12px; visibility: hidden; padding-left: 3px; padding-right: 3px;"/>
                                                                        <tr:selectOneChoice id="MFEventMinute"
                                                                                            simple="true"
                                                                                            styleClass="ho_soc"
                                                                                            inlineStyle="visibility: hidden;"
                                                                                            value="#{HomeBean.selectedMinute}">
                                                                            <f:selectItems value="#{HomeBean.minuteList}"/>
                                                                        </tr:selectOneChoice>
                                                                    </tr:panelHorizontalLayout>
                                                                    <tr:panelHorizontalLayout halign="right">
                                                                        <f:facet name="separator">
                                                                            <tr:outputText value=""
                                                                                           inlineStyle="padding-left: 2px; padding-right: 2px;"/>
                                                                        </f:facet>
                                                                        <tr:goLink onclick="showDlg(1);"
                                                                                   inlineStyle="color: White; background: White; border-color: White;">
                                                                            <tr:image source="${facesContext.externalContext.request.contextPath}/style/images/h/photo-icon.png"
                                                                                      width="15"
                                                                                      height="16"/>
                                                                        </tr:goLink>
                                                                        <tr:goLink onclick="showDlg(2);"
                                                                                   inlineStyle="color: White; background: White; border-color: White;">
                                                                            <tr:image source="${facesContext.externalContext.request.contextPath}/style/images/h/map-icon.png"
                                                                                      width="16"
                                                                                      height="16"/>
                                                                        </tr:goLink>
                                                                        <tr:goLink onclick="showDlg(3);"
                                                                                   inlineStyle="color: White; background: White; border-color: White;">
                                                                            <tr:image source="${facesContext.externalContext.request.contextPath}/style/images/h/video-icon.png"
                                                                                      width="17"
                                                                                      height="16"/>
                                                                        </tr:goLink>
                                                                    </tr:panelHorizontalLayout>
                                                                </tr:panelHorizontalLayout>
                                                            </tr:panelLabelAndMessage>
                                                            <tr:spacer height="3px"/>
                                                            <tr:inputText id="MFMessageBox"
                                                                          rows="2"
                                                                          wrap="hard"
                                                                          styleClass="ho_msgb"
                                                                          simple="true"
                                                                          maximumLength="150"
                                                                          value="#{HomeBean.eventMessage}"/>
                                                            <tr:panelHorizontalLayout halign="right"
                                                                                      inlineStyle="margin-top: 3px; padding: 0px; ">
                                                                <trh:cellFormat styleClass="ho_pb_r">
                                                                    <tr:commandButton id="ho_evtpostbtn"
                                                                                      text="#{messages['global.post']}"
                                                                                      styleClass="ho_pb"
                                                                                      partialSubmit="true"
                                                                                      actionListener="#{HomeBean.saveEvent}"/>
                                                                </trh:cellFormat>
                                                            </tr:panelHorizontalLayout>
                                                        </tr:panelFormLayout>
                                                    </tr:panelGroupLayout>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                     
                    <div class="msgb">
                        <div class="msgb_b">
                            <div class="msgb_l">
                                <div class="msgb_r">
                                    <div class="msgb_bl">
                                        <div class="msgb_br">
                                            <div class="msgb_tl">
                                                <div class="msgb_tr">
                                                    <tr:panelGroupLayout layout="vertical">
                                                        <tr:outputText value="#{messages['global.recentposts']}"
                                                                       styleClass="fsp_ht"/>
                                                        <tr:spacer height="10px"/>
                                                        <tr:table value="#{HomeBean.allEvents}"
                                                                  var="evt"
                                                                  verticalGridVisible="false"
                                                                  partialTriggers="::ho_evtpostbtn"
                                                                  width="100%">
                                                            <tr:column>
                                                                <tr:panelHorizontalLayout>
                                                                    <f:facet name="seperator">
                                                                        <tr:spacer width="20px"/>
                                                                    </f:facet>
                                                                    <tr:image source="#{ evt.owner.photoNormal == null ? ConstantsBean.manImage : evt.owner.photoNormal }"
                                                                              height="50"
                                                                              width="50"></tr:image>
                                                                    <tr:outputText value="#{evt.message}"
                                                                                   inlineStyle="padding-left: 10px"/>
                                                                </tr:panelHorizontalLayout>
                                                            </tr:column>
                                                        </tr:table>
                                                    </tr:panelGroupLayout>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                 
                <div class="r">
                    <div class="sb">
                        <div class="sb_b">
                            <div class="sb_l">
                                <div class="sb_r">
                                    <div class="sb_bl">
                                        <div class="sb_br">Search</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                 
                <div class="bb">Myfoon (C) 2008</div>
            </div>
            
            
            
            
            
            
            <div id="modalPage">
                <div class="modalBackground"></div>
                 
                <div class="modalContainer">
                    <div class="modal">
                        <div class="modalBody">
                            <tr:commandButton id="btn_renderp"
                                              inlineStyle="display: none; visibility: hidden;"
                                              partialSubmit="true"
                                              action="#{HomeBean.showPhotoBox}"/>
                             
                            <tr:commandButton id="btn_renderm"
                                              inlineStyle="display: none; visibility: hidden;"
                                              partialSubmit="true"
                                              action="#{HomeBean.showMapBox}"/>
                             
                            <tr:commandButton id="btn_renderv"
                                              inlineStyle="display: none; visibility: hidden;"
                                              partialSubmit="true"
                                              action="#{HomeBean.showVideoBox}"/>
                             
                            <tr:panelBox partialTriggers="btn_renderp btn_renderm btn_renderv"
                                         contentStyle="padding: 10px; background-color: White;"
                                         inlineStyle="width: 100%; height: 100%;">
                                <div style="position: absolute; top: 50%; left: 50%">
                                    <tr:statusIndicator inlineStyle="position: relative; top: -24px; left: -24px">
                                        <f:facet name="busy">
                                            <tr:panelGroupLayout layout="vertical">
                                                <tr:image source="${facesContext.externalContext.request.contextPath}/style/images/myfoon2/ajax-loading.gif"
                                                          width="48"
                                                          height="48"/>
                                                <tr:outputText value="Loading"
                                                               inlineStyle="font-weight: bold; font-size: 14px;"/>
                                            </tr:panelGroupLayout>
                                        </f:facet>
                                        <f:facet name="ready"></f:facet>
                                    </tr:statusIndicator>
                                </div>
                                <tr:panelGroupLayout layout="vertical"
                                                     rendered="#{HomeBean.mapvisible}">
                                    <div>
                                        <tr:outputText value="Mark your Location on the map"
                                                       inlineStyle="color: #02243c; font-weight: bold; font-size: 18px;"
                                                       rendered="#{HomeBean.mapvisible}"/>
                                    </div>
                                    <div style="position: relative; padding-top: 10px; padding-bottom: 10px; margin-top: 10px; margin-bottom: 10px; border-top: Solid 1px #b9d5eb; border-bottom: Solid 1px #b9d5eb;">
                                        <tr:panelHorizontalLayout rendered="#{HomeBean.mapvisible}"
                                                                  valign="top">
                                            <tr:panelGroupLayout layout="vertical">
                                                <tr:inputText styleClass="ho_loc"
                                                              label="Location"
                                                              rendered="#{HomeBean.mapvisible}"
                                                              id="locSearchInput"
                                                              onkeyup="keyEvent(event); return false;"
                                                              autoComplete="off"/>
                                                <div style="width: 300px;"
                                                     class="autosuggest"
                                                     onkeypress="alert(1);"
                                                     id="searchResultsArea"></div>
                                            </tr:panelGroupLayout>
                                            <div id="map_div"></div>
                                        </tr:panelHorizontalLayout>
                                    </div>
                                    <tr:panelHorizontalLayout rendered="#{HomeBean.mapvisible}">
                                        <f:facet name="separator">
                                            <tr:spacer width="10px"/>
                                        </f:facet>
                                        <trh:cellFormat styleClass="ho_pb_r"
                                                        rendered="#{HomeBean.mapvisible}">
                                            <tr:commandButton text="save"
                                                              styleClass="ho_pb"
                                                              rendered="#{HomeBean.mapvisible}"
                                                              onclick="hideDlg(); return false;"/>
                                        </trh:cellFormat>
                                        <trh:cellFormat styleClass="ho_pb_r"
                                                        rendered="#{HomeBean.mapvisible}">
                                            <tr:commandButton text="cancel"
                                                              onclick="hideDlg(); return false;"
                                                              rendered="#{HomeBean.mapvisible}"
                                                              styleClass="ho_pb"/>
                                        </trh:cellFormat>
                                    </tr:panelHorizontalLayout>
                                </tr:panelGroupLayout>
                            </tr:panelBox>
                        </div>
                    </div>
                </div>
            </div>
        </tr:form>
    </facet>
</tr:document>